<?php

class Core_Form_Admin_Settings_General_Cache extends Core_Form_Admin_Settings_Base
{
    protected function _init()
    {
        $this -> setName('form_settings_cache') -> setDesc('@self') -> setTitle('@self');

        $this -> addElement('@radio', 'site_cache_enabled', array(
            'multiOptions' => array(
                'on' => 'yes',
                'off' => 'no'
            ),
            'value' => 'on',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@radio', 'site_cache_adapter', array(
            'multiOptions' => array(
                'file' => 'file based',
                'apc' => 'apc cache',
                'memcache' => 'mem cache',
            ),
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_cache_lifetime', array(
            'value' => 300,
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_cache_memcache-host', array(
            'value' => '127.0.0.1',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_cache_file-dir', array(
            'value' => '',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@radio', 'site_cache_file-locking', array(
            'value' => 1,
            'multiOptions' => array(
                'on' => 'yes',
                'off' => 'no'
            ),
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_cache_memcache-port', array(
            'label' => '@self',
            'desc' => '@self',
            'value' => '2121',
        ));

        $this -> addElement('@radio', 'site_cache_memcache-compression', array(
            'value' => '2121',
            'multiOptions' => array(
                'on' => 'yes',
                'off' => 'no'
            ),
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@group', 'buttons');

        $this -> getElement('buttons') -> addElement('@submit', '_submit') -> addElement('@cancel', '_canel');
    }

}
